﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MMOArpgServer.DAL
{
    public abstract class CacheFactory
    {
        private static AccountCachePool _AccountCachePool = new AccountCachePool();

        public static AccountCachePool AccountCachePool
        {
            get
            {
                return _AccountCachePool;
            }

            set
            {
                _AccountCachePool = value;
            }
        }

        public static AccountDBData GetAccountCache(object key)
        {
            return AccountCachePool.GetCacheByKey(key) as AccountDBData;
        }

        public static  void Release() {

            _AccountCachePool.Release();
        }
 
    }
}
